/**
  SUNNY Project, Anyang Normal University, IMP-CAS
	\class TASPState
	\brief Single particle state for a one-body Hamiltonian with a central force.
	Labeled by n, l, j and mj. Used as a building basis for configuration
	interaction calculations in quantum many-body problems.
	\author SUN Yazhou, asia.rabbit@163.com
	\since 2020/01/31
	\date Last modified: 2020/01/31 by SUN Yazhou
	\copyright 2020-2022, SUN Yazhou
	\copyright SUNNY project, Anyang Normal University, IMP-CAS
*/

#include <iostream>
#include <iomanip>
#include "TASPState.h"

using std::cout;
using std::endl;
using std::setw;

TASPState::	TASPState(int index, int n, int l, int _2j, int _2mj, int _2tz,
	double energy) : fIndex(index), fn(n), fl(l), f2j(_2j), f2mj(_2mj), f2tz(_2tz),
	fEnergy(energy){}

TASPState::~TASPState(){}

/// print the single particle state
void TASPState::Print() const{
	cout << std::setprecision(4);
	cout << setw(3) << fIndex << setw(5) << fn << setw(3) << fl << setw(4) << f2j;
	cout << setw(4) << f2mj << setw(5) << f2tz << setw(5) << fEnergy << endl;
} // end member function Print

// parity
bool TASPState::Parity() const{
	return fl & 1 ? false : true;
} // end member function Parity
